package com.wyj.executor;

import com.wyj.pojo.Configuration;
import com.wyj.pojo.MapperedStatement;

import java.sql.SQLException;
import java.util.List;

/**
 * TODO: 数据库具体的操作类。封装了jdbc的操作。
 *
 * @author wuyijie
 * @date 2021/10/30 1:58 下午
 */
public interface Executor {

    /**
     * TODO: 执行查询接口
     *
     * @param configuration
     * @param ms
     * @param params
     * @return java.util.List<E>
     * @author wuyijie
     * @date 2021/10/30 1:59 下午
     */
    <E> List<E> query(Configuration configuration, MapperedStatement ms, Object... params) throws SQLException, ClassNotFoundException, NoSuchFieldException;


    int update(Configuration configuration, MapperedStatement ms, Object... params) throws SQLException, ClassNotFoundException, NoSuchFieldException;


}
